/**
 *
 * 短信模板
 * http://192.168.21.101:8087/doc.html#/jh-basic/%E7%9F%AD%E4%BF%A1%E9%80%9A%E7%9F%A5-%E7%9F%AD%E4%BF%A1%E6%A8%A1%E6%9D%BF/recordsPageListUsingPOST
 *
 */

import { commonPromise } from '../index.js'

// 跨域代理前缀
// const API_PROXY_PREFIX = '/api'
const API_PROXY_PREFIX = ''
const BASE_URL = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
// const BASE_URL = process.env.VUE_APP_API_BASE_URL

const dataBoardApi = {
  templatePageList: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/pageList`, method: 'post' }), // 短信模板列表查询
  templateDataList: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/dataList`, method: 'post' }), // 短信模板列表查询（下拉数据）
  templateGet: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/get`, method: 'post' }), // 短信模板详情查询
  templateSend: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/send`, method: 'post' }), // 模板消息发送接口
  getCustomerUserCount: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/getCustomerUserCount`, method: 'post' }), // 查询客户人群数量
  getRecordsDetails: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/getRecordsDetails`, method: 'post' }), // 消息发送记录详情查询
  recordsPageList: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/recordsPageList`, method: 'post' }), // 消息发送记录列表查询
  refreshTemplate: (data) => commonPromise({ data, url: `${BASE_URL}/basic/message/template/refreshTemplate`, method: 'post' }) // 消息发送记录列表查询
}

export default dataBoardApi

